package com.shouxun.microclassroom;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.style.ForegroundColorSpan;
import android.view.Window;
import android.widget.TextView;

public class LevelActivity extends Activity {
	TextView t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		requestWindowFeature(Window.FEATURE_NO_TITLE);  
		super.onCreate(savedInstanceState);
		setContentView(R.layout.level);
		ExitApplication.getInstance().addActivity(this);
		t1= (TextView) findViewById(R.id.t1); 
		t2= (TextView) findViewById(R.id.t2);
		t3= (TextView) findViewById(R.id.t3);
		t4= (TextView) findViewById(R.id.t4);
		t5= (TextView) findViewById(R.id.t5);
		t6= (TextView) findViewById(R.id.t6);
		t7= (TextView) findViewById(R.id.t7);
		t8= (TextView) findViewById(R.id.t8);
		t9= (TextView) findViewById(R.id.t9);
		t10= (TextView) findViewById(R.id.t10);
		t11= (TextView) findViewById(R.id.t11);
		SpannableStringBuilder builder = new SpannableStringBuilder(t1.getText().toString());  
		ForegroundColorSpan redSpan = new ForegroundColorSpan(Color.RED);  
		builder.setSpan(redSpan, 4,7, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);    
		t1.setText(builder);  
		builder = new SpannableStringBuilder(t2.getText().toString());  
		builder.setSpan(redSpan, 4,8, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);    
		t2.setText(builder); 
		builder = new SpannableStringBuilder(t3.getText().toString());  
		builder.setSpan(redSpan, 6,9, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);    
		t3.setText(builder);
		builder = new SpannableStringBuilder(t4.getText().toString());  
		builder.setSpan(redSpan, 6,8, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);    
		t4.setText(builder); 
		builder = new SpannableStringBuilder(t5.getText().toString());  
		builder.setSpan(redSpan, 6,11, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);    
		t5.setText(builder);
		builder = new SpannableStringBuilder(t6.getText().toString());  
		builder.setSpan(redSpan, 8,10, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);    
		t6.setText(builder); 
		builder = new SpannableStringBuilder(t7.getText().toString());  
		builder.setSpan(redSpan, 6,9, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);    
		t7.setText(builder); 
		builder = new SpannableStringBuilder(t8.getText().toString());  
		builder.setSpan(redSpan, 6,8, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);    
		t8.setText(builder); 
		builder = new SpannableStringBuilder(t9.getText().toString());  
		builder.setSpan(redSpan, 8,10, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);    
		t9.setText(builder); 
		builder = new SpannableStringBuilder(t10.getText().toString());  
		builder.setSpan(redSpan, 7,10, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);    
		t10.setText(builder); 
		builder = new SpannableStringBuilder(t11.getText().toString());  
		builder.setSpan(redSpan, 7,9, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);    
		t11.setText(builder); 
	}
}
